<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>管理后台首页</title>
    <link rel="stylesheet" href="{$CSS}/bootstrap3.3.7.min.css">
    <style>
        em{
            font-size: 20px;
            color: red;
            vertical-align: middle;
            line-height: 20px;
            height: 20px;
            display: inline-block;
        }
        .mar{
            margin-right:10px
        }
        .pic{
        	float:none;margin-bottom:10px
        }
        .pic img{
        	width: 393px;
    		height: 75px;
    	}
    </style>
</head>
<body style="overflow-x:hidden;">
    <div style="padding:10px;border-bottom:1px solid #eee;font-size:15px;font-weight:700">短信配置</div>
    <div style="margin:40px auto;">
        <div class="bs-example" data-example-id="simple-horizontal-form">
            <form class="form-horizontal" method="post" action="" name="clientForm" id="clientForm" onsubmit="return checksub();">{tk()}{$u->hidden('id')}
			 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>用户ID</label>
                    <div class="col-sm-3">
						{$u->text('message_id','class="form-control" placeholder="用户ID"')}
                    </div>
					<span style="line-height: 30px;font-size:17px">(官方专用高速短信通道，请联系<span style="color:red">管理员</span> 购买短信并开设账号，200元=2200条，300元=3800条)</span>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>密码</label>
                    <div class="col-sm-3">
						 {$u->password('message_pwd','class="form-control" placeholder="密码"')}

                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>签名</label>
                    <div class="col-sm-3">
						{$u->text('message_sign','class="form-control"  placeholder="短信签名"')}
                    </div>
						<span style="line-height: 30px;font-size:17px">(短信的后缀，必须带有签名，如：小程序)</span>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">验证码</label>
                    <div class="col-sm-3">
						<input type="text" id="cikle" name="cikle" style="display:inline-block;width:200px" class="form-control" placeholder="验证码">
						 <img  style="-webkit-user-select: none" src="/captcha.html">
                    </div>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">测试</label>
                    <div class="col-sm-4">
						<input type="text" id="telephone" name="telephone"  style="display:inline-block;width:300px" class="form-control" placeholder="手机号码" >
						 <a href="javascript:void(0)" id="sendtel" style="display: inline-block;width: 80px;height: 35px;overflow: hidden;border-radius: 5px;line-height: 38px;text-align: center;float: right;margin: 0 18px 0 0;background: rgb(26, 189, 108);color: #fff;">测试</a>
                    </div>
                </div>
             <!-- <div class="form-group">
                <label class="col-sm-2 control-label"><em>*</em>短信价格：</label>
                <div class="col-sm-3">
                  {$u->text('sms_price','class="form-control"  placeholder="短信单价"')}
                </div>
                <span style="line-height: 30px;font-size:17px">(?元/条)</span>
              </div>-->
                <div class="form-group">
                   <label for="inputPassword3" class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <input class="btn btn-success mar" ID="btnAdd" type="submit" value="提交">
                        <input class="btn btn-warning mar" ID="Submit1" type="reset" value="重置">
                        <input class="btn btn-danger mar"  ID="back" type="button" onclick="history.back();" value="返回">
                        </div>
                </div>
				
            </form>
        </div>

    </div>
</body>
<script>
	 $("#sendtel").bind('click',function(){
	 
		var tel=$("#telephone").val();
		var check=$("#cikle").val();	
		if(check==''){
			alert('请先输入验证码');
			return false;
		}
		if(tel==''){
			alert('手机号不能为空');
			return false;
		}
		if(tel.length!=11){
			alert('手机号需11位');
			return false;
		}
		$.get("/sendcode.html",{
		tel:tel,check:check},function(data){
			if(data.msg=='ok'){
				alert("短信发送成功");
			}else if(data.msg=='error'){
				alert("验证码错误");
			}else{
				alert("手机号码有无或系统出错，请重试");
			}
		})
    
  })
</script>

</html>
